<?php

namespace App\Models;


use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;


class Area extends Model
{

    protected  $table='area';

    public  static  function getList($ids)
    {
        if(is_array($ids))
        {
            $nodes = Area::orWhereIn('id', $ids)->get()->toArray();
        }else
        {
            $nodes = Area::where('id', $ids)->get()->toArray();
        }

        $rs = [];
        foreach ($nodes as $value) {

            $rs[$value['id']] = $value;
        }

        return $rs;
    }
}
